<div class="panel panel-default">
  <div class="panel-heading">
    <i class="fa fa-fire"></i> 最热课程
  </div>
  <div class="panel-body">
    <?php foreach ($lesson['list'] as $key => $row): ?>
      <p><span
            class="badge"><?= $key + 1 ?></span> <?= CHtml::link(CHtml::encode($row->name), Yii::app()->createUrl('lesson/view', array('id' => $row->lesson_id))) ?> <?= CHtml::encode($row->user->name) ?>
      </p>
    <?php endforeach ?>
  </div>
</div>

<div class="panel panel-default">
  <div class="panel-heading">
    <i class="fa fa-question"></i> 最新问题
  </div>
  <div class="panel-body">
    <?php foreach ($issue['list'] as $key => $row): ?>
      <p>
        <?php if ($row->state == 1): ?>
          <span class="label label-success">已解决</span>
        <?php else: ?>
          <span class="label label-info">未解决</span>
        <?php endif ?>
        <?= CHtml::link(CHtml::encode($row->title), Yii::app()->createUrl('issue/view', array('id' => $row->issue_id))) ?> <?= CHtml::encode($row->user->name) ?>
      </p>
    <?php endforeach ?>
  </div>
</div>
<div class="panel panel-default">
  <div class="panel-heading">
    <i class="fa fa-group"></i> 最新讨论
  </div>
  <div class="panel-body">
    <?php foreach($topic['list'] as $row):?>
        <p><a href="<?=Yii::app()->createUrl('topic/view',array('id'=>$row->topic_id))?>"><?=CHtml::encode($row->title)?></a> <?=CHtml::encode($row->user->name)?></p>
    <?php endforeach?>
  </div>
</div>